﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TMS.DAL.Migrations
{
    public partial class aaaw : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Housestates",
                columns: table => new
                {
                    Hsid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Hsname = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Housestates", x => x.Hsid);
                });

            migrationBuilder.CreateTable(
                name: "Roomnum",
                columns: table => new
                {
                    Nid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Rtypeid = table.Column<int>(type: "int", nullable: false),
                    Hsid = table.Column<int>(type: "int", nullable: false),
                    Nname = table.Column<int>(type: "int", nullable: false),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Cdate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Rstate = table.Column<int>(type: "int", nullable: false),
                    Isdel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roomnum", x => x.Nid);
                });

            migrationBuilder.CreateTable(
                name: "Roomprice",
                columns: table => new
                {
                    Pid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Typeid = table.Column<int>(type: "int", nullable: false),
                    Storeid = table.Column<int>(type: "int", nullable: false),
                    Pname = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Number = table.Column<int>(type: "int", nullable: false),
                    Breaknum = table.Column<int>(type: "int", nullable: false),
                    Sdate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Edate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    States = table.Column<bool>(type: "bit", nullable: false),
                    Isdelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roomprice", x => x.Pid);
                });

            migrationBuilder.CreateTable(
                name: "Roomtype",
                columns: table => new
                {
                    ID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Rname = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Picture = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Maxnum = table.Column<int>(type: "int", nullable: false),
                    Squre = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Cretatime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Stets = table.Column<int>(type: "int", nullable: false),
                    Isdel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roomtype", x => x.ID);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Housestates");

            migrationBuilder.DropTable(
                name: "Roomnum");

            migrationBuilder.DropTable(
                name: "Roomprice");

            migrationBuilder.DropTable(
                name: "Roomtype");
        }
    }
}
